public class Demo1 {
    /**
     * 用于返回学生的成绩等级
     *
     * @param score 学生的成绩
     * @return 返回成绩等级
     */
    public static char getScore(int score) {
        char level = ' ';
        if (score >= 90) {
            level = 'A';
        } else if (score >= 60) {
            level = 'B';
        } else {
            level = 'C';
        }
        return level;
    }

    public static void main(String[] args) {
        int score = 90;
        char level;
        level = getScore(score);
        System.out.println("该学生的分数为：" + score + "," + "等级为：" + level);
    }
}
